<template>
	<view class="index-container">
		<view class="swiper">
			<u-swiper :list="list" :effect3d="true"></u-swiper>
			<view class="search">
				<u-search 
					placeholder="日照香炉生紫烟" 
					v-model="keyword" 
					shape="square"
					search-icon="map"
				></u-search>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				list: [{
						image: 'https://cdn.uviewui.com/uview/swiper/1.jpg',
						title: '昨夜星辰昨夜风，画楼西畔桂堂东'
					},
					{
						image: 'https://cdn.uviewui.com/uview/swiper/2.jpg',
						title: '身无彩凤双飞翼，心有灵犀一点通'
					},
					{
						image: 'https://cdn.uviewui.com/uview/swiper/3.jpg',
						title: '谁念西风独自凉，萧萧黄叶闭疏窗，沉思往事立残阳'
					}
				],
			}
		}
	}
</script>
<style lang="scss" scoped>
	uni-page-wrapper {
		width: 100%;
		height: 100%;
		overflow: hidden;
	}

	uni-page-body {
		width: 100%;
		height: 100%;
		overflow: hidden;
	}

	.index-container {
		height: 100%;
		display: flex;
		flex-direction: column;
		overflow-y: auto;
	}

	.swiper{
		width: 100%;
		position: relative;
		uni-swiper{
			height: 212px;
		}
		.search{
			width: 100%;
			display: flex;
			padding: 0 10px;
			justify-content: center;
			position: absolute;
			top: 25px;
		}
	}
</style>
